package org.correct.servlet;

import java.io.FileNotFoundException;

import javax.servlet.http.HttpServlet;

import org.correct.config.Config;
import org.correct.correcter.Correcter;
import org.correct.util.Logger;
import org.correct.util.PageInfoAccessor;

public class Initializer extends HttpServlet {
	public static PageInfoAccessor pageInfo;
	public static String basePath;
	public static Logger logger;
	
	@Override
	public void init() {
		basePath = getServletContext().getRealPath("/");
		new Correcter();
		pageInfo = new PageInfoAccessor(getServletContext().getRealPath("/") + Config.PAGE_INFO_PATH);
		pageInfo.load();
		try {
			logger = new Logger(getServletContext().getRealPath("/") + "log");
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		}
	}
}
